package com.mysteel.authserver.feign;

import com.mysteel.authserver.vo.UserLoginVo;
import com.mysteel.authserver.vo.UserRegisterVo;
import com.mysteel.authserver.vo.WeiBoAccessTokenVo;
import com.mysteel.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * ProjectName: mail
 * ClassName: MemberFeignService
 * Description:
 * date: 2021/03/06/006 16:40
 *
 * @author xiaochao
 */
@FeignClient("member")
public interface MemberFeignService {

    /**
     * 远程注册服务
     * @param registerVo
     * @return
     */
    @PostMapping("/member/member/register")
    R registerUser(@RequestBody UserRegisterVo registerVo);

    /**
     * 远程登录服务
     * @param loginVo
     * @return
     */
    @PostMapping("/member/member/login")
    R userLogin(@RequestBody UserLoginVo loginVo);

    @PostMapping("/member/member/oauth2/login")
    R socialLogin(@RequestBody WeiBoAccessTokenVo loginVo);
}
